package com.zlt.dao;

import com.zlt.entity.Role;
import com.zlt.entity.User;

import java.util.List;
import java.util.Map;

public interface UserDao {
    User selectUserByUid(String uid);

    User selectUserByUsername(String phone);


    int updateRecruit(User user);

    /**
     * 获取用户名的id
     *
     * @param username 用户名
     * @return
     */
    String getUserUid(String username);

    int insert(User user);

    User selectUserByUsername(String username, Integer state);

    User selectUserByEmail(String email, Integer state);

    List<Role> selectRolesByUid(String uid);


    Integer getUserRole(String username);

    List<Map<String, Object>> selectUserCompanyByUid(String uid);

    int insertUserCompany(String uid, Integer cid, Integer state);

    int updateUserCompany(String uid, Integer cid, Integer state);

    int updateUser(User user);

    int updateUserByEmail(User user);
}
